<template>
  <div class="movie">
    <p>{{$route.params.id}}--{{$route.params.name}}</p>
    <button @click="$router.go(-1)">后退</button>
    <button @click="$router.push('/home')">首页</button>
    <button @click="a"> 点击</button>
  </div>
</template>

<script>
export default {
methods: {
  a(){
    console.log(this.$route)
  }
},
}
</script>

<style>
.movie{
    min-height: 200px;
    min-width: 300px;
    background-color: pink;
}
</style>